package com.richmond.data.bilan;

import java.util.Collection;
import java.util.Vector;

/**
 * User: csavard
 * Date: 12-09-18
 * Time: 22:23
 */
public class CategoryRecords {
    private Category category;
    private Collection<BilanRecord> records;

    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }

    public void add(BilanRecord record){
        if(records == null){
            records  = new Vector<>();
        }

        records.add(record);
    }
    public Collection<BilanRecord> getRecords() {
        return records;
    }

    public void setRecords(Collection<BilanRecord> records) {
        this.records = records;
    }

    @Override
    public String toString() {
        return getCategory().toString();
    }
}
